﻿@using LotteryVoteMVC.Core.Application
@using LotteryVoteMVC.Core
@using LotteryVoteMVC.Models
@using LotteryVoteMVC.Resources
@using LotteryVoteMVC.Utility
@model PagedList<DropWater>
@{
    ViewBag.Title = Resource.TomorrowDropWater;
    Layout = "~/Views/Shared/Main.cshtml";
}
@section Header
{
    <script src="@Url.Content("~/Scripts/Customer/SearchHelper.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Customer/TableBase.js")" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/TableBase.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/inputs.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Pager/pagerGray.css")" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .inner
        {
            overflow: hidden;
            padding: 5px 0px;
        }
        .inner span
        {
            float: left;
        }
        .inner div
        {
            float: left;
            padding-left: 5px;
            padding-right: 5px;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#add").bind("click", function () {
                var url = $(this).attr("action");
                IsSearch = false;
                $("form").attr("action", url).trigger("submit");
            });
        });
    </script>
}
<div id="searchBar">
    @using (Html.BeginForm())
    {
        <span>@Resource.Num</span>
        @Html.TextBox("Num")
        <span>@Resource.GameType</span>
        @Html.Partial("~/Views/Partial/GamePlayWay.cshtml", LotterySystem.Current.GamePlayWays)
        <span>@Resource.Amount</span>
        @Html.TextBox("Amount")
        <span>@Resource.DropWater</span>
        @Html.TextBox("DropWater")
        <input type="submit" name="search" id="search" value="@Resource.Search" />
        <div class="inner">
            <span>
                @Resource.Company</span>
            @Html.CheckBoxList("Companys", ViewBag.Companys as MultiSelectList)
            <input type="button" id="add" name="add" value="@Resource.Add" action="/DropWater/AddTomorrowDrop" />
        </div>
    }
</div>
@Html.Partial("DropWaterList")
